#!/usr/bin/env python
# -*- coding: UTF-8 -*-

pump_flow_max = 3.7296  # 单个水泵最大流速 L/min
standard_dosage = 6.0  # 单个标准用药量 10 L/亩
standard_dosage_pump = standard_dosage / 2  # 标准用药量下，每个泵所需负载的标准流量 L/min
extend = 6.0  # 喷幅
mileage_per_mu = 666.666 / extend  # 单亩数作业里程 面积/喷幅
max_velocity = mileage_per_mu / ((standard_dosage_pump / pump_flow_max) * 60)  # 单亩数作业里程/ (以最大流速打完标准量的时间（s）)


def flowtransformer(velocity=0.01):
    current_cost_time = (mileage_per_mu / velocity) / 60  # 以当前车速打完一亩地所需的时间（分钟）  # velocity m/s
    current_cost_flow = standard_dosage_pump / current_cost_time  # 以当前车速，进行标准药量施药，每分钟的理论施药量
    flow_per_second = current_cost_flow / 60  # 每秒钟药量
    print("每秒钟药量%s  每分钟药量%s " % (flow_per_second, current_cost_flow))
    return flow_per_second


if __name__ == '__main__':
    flowtransformer(7308 / 3600)
